/*
 *  common.h
 *  FrostOS
 *
 *  Created by bluechill on 12/10/09.
 *  Copyright 2009 SecurityOverride. All rights reserved.
 *
 */

#ifndef COMMON_H
#define COMMON_H

#include "size_t.h"
#include <stdint.h>

#define PANIC(msg) panic(msg, __FILE__, __LINE__);
#define ASSERT(b) ((b) ? (void)0 : panic_assert(__FILE__, __LINE__, #b))

extern void panic(const char *message, const char *file, uint32_t line);
extern char memcmp(const void *_m1, const void *_m2, unsigned short n);	//compare pecies of memory
extern void memcpy(void *_d, void *_s, unsigned short n);					//compies memory
extern size_t strlen(const char *s);							//calculates the length of a string
extern void ntostr(unsigned int i, char *s);		//Converts a number to a string (needs replacement)
extern unsigned char* memset(unsigned char *dest, unsigned char val, int count);
extern unsigned short* memsetw(unsigned short *dest, unsigned short val, int count);

#endif
